package com.soft.javase.day02.review.extendss;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/16
 */
public class Animal {
    private String name;
    private int age;

    public void eat() {
        System.out.println("一只"+age+"岁的"+name+"正在吃饭");
    }

    public Animal() {
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
